package com.vzaar;

/**
 * Active video and oEmbed details along with it's relevant metadata.
 * 
 * @author Marc G. Smith
 */
public class VideoDetails 
{
	///////////////////////////////////////////////////////////////////////////
	// Private Members ////////////////////////////////////////////////////////
	///////////////////////////////////////////////////////////////////////////
	
	private String type;
	private double version;
	private String title;
	private String description;
	private String authorName;
	private String authorUrl;
	private int authorAccount;
	private String providerName;
	private String providerUrl;
	private String thumbnailUrl;
	private int thumbnailWidth;
	private int thumbnailHeight;
	private String framegrabUrl;
	private int framegrabWidth;
	private int framegrabHeight;
	private String html;
	private int height;
	private int width;
	private boolean borderless;
	private double duration;
	private int videoStatusId;
	
	///////////////////////////////////////////////////////////////////////////
	// Public and Package Protected Methods ///////////////////////////////////
	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * Package protected constructor.
	 * 
	 * @param type the oEmbed resource type
	 * @param version the vzaar API version number
	 * @param title the video title. It may be null
	 * @param description the video description. It may be null 
	 * @param authorName the vzaar user name (i.e. their login)
	 * @param authorUrl the link to the vzaar user summary page 
	 * @param authorAccount the number representing the users vzaar account
	 * @param providerName this will always be vzaar
	 * @param providerUrl this will always be http://vzaar.com
	 * @param thumbnailUrl the URL link that points to the video thumbnail  
	 * @param thumbnailWidth the width of the thumbnail in pixels
	 * @param thumbnailHeight the height of the thumbnail in pixels
	 * @param framegrabUrl the URL that points to a framegrab of the video
	 * @param framegrabWidth the width of the frame grab in pixels
	 * @param framegrabHeight the height of the frame grab in pixels
	 * @param html the exact HTML you need to use to embed the video 
	 * 		into a webpage 
	 * @param height the height of the video
	 * @param width the width of the video
	 * @param borderless does the video player has no border
	 * @param duration the duration of the video
	 * @param videoStatusId the video status id
	 */
	VideoDetails(
		String type, double version, String title, String description,
		String authorName, String authorUrl, int authorAccount,
		String providerName, String providerUrl, String thumbnailUrl,
		int thumbnailWidth, int thumbnailHeight, String framegrabUrl,
		int framegrabWidth, int framegrabHeight, String html, int height,
		int width, boolean borderless, double duration, int videoStatusId) 
	{
		this.type = type;
		this.version = version;
		this.title = title;
		this.description = description;
		this.authorName = authorName;
		this.authorUrl = authorUrl;
		this.authorAccount = authorAccount;
		this.providerName = providerName;
		this.providerUrl = providerUrl;
		this.thumbnailUrl = thumbnailUrl;
		this.thumbnailWidth = thumbnailWidth;
		this.thumbnailHeight = thumbnailHeight;
		this.framegrabUrl = framegrabUrl;
		this.framegrabWidth = framegrabWidth;
		this.framegrabHeight = framegrabHeight;
		this.html = html;
		this.height = height;
		this.width = width;
		this.borderless = borderless;
		this.duration = duration;
		this.videoStatusId = videoStatusId;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The oEmbed resource type. For vzaar video assets this will always 
	 * be video
	 * 
	 * @return the oEmbed resource type
	 */
	public String getType() {
		return type;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The provider name. This will always be vzaar.
	 * 
	 * @return the provider name
	 */
	public String getProviderName() {
		return providerName;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The provider URL. This will always be http://vzaar.com.
	 * 
	 * @return the provider URL
	 */
	public String getProviderUrl() {
		return providerUrl;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The width of the thumbnail in pixels. This is usually 120px
	 * 
	 * @return the thumbnail width in pixels
	 */
	public int getThumbnailWidth() {
		return thumbnailWidth;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The height of the thumbnail in pixels. This is usually 90px.
	 * 
	 * @return the thumbnail height in pixels
	 */
	public int getThumbnailHeight() {
		return thumbnailHeight;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The URL that points to a frame grab of the video. This is the same as 
	 * the thumbnail normally but a bigger size, and represents the still 
	 * image on sees before clicking play in the video player.
	 * 
	 * @return the URL that points to a frame grab of the video
	 */
	public String getFramegrabUrl() {
		return framegrabUrl;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The width of the frame grab image in pixels. This will be normally be 
	 * the same size as the video, but not necessarily the same size as the 
	 * video player which may be larger. The default size is 320px.
	 * 
	 * @return the width of the frame grab image in pixels
	 */
	public int getFramegrabWidth() {
		return framegrabWidth;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The height of the frame grab image in pixels. This will be normally be 
	 * the same size as the video, but not necessarily the same size as the 
	 * video player which may be larger. The default size is 240px.
	 * 
	 * @return the height of the frame grab image in pixels
	 */
	public int getFramegrabHeight() {
		return framegrabHeight;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * @return the html
	 */
	public String getHtml() {
		return html;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * This will return the exact HTML you need to use to embed the video 
	 * into a web page. This should work for all standard web pages. The HTML 
	 * will be encoded as follows JSON or XML.
	 * 
	 * @return the exact HTML you need to use to embed the video into a 
	 * 	web page
	 */
	public String getAuthorName() {
		return authorName;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The link to the vzaar user summary page
	 * 
	 * @return the link to the vzaar user summary page
	 */
	public String getAuthorUrl() {
		return authorUrl;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The number representing the users vzaar account. 1 represents a free 
	 * account.
	 * 
	 * @return the number representing the users vzaar account
	 */
	public int getAuthorAccount() {
		return authorAccount;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The vzaar API version number.
	 * 
	 * @return the vzaar API version number
	 */
	public double getVersion() {
		return version;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The video title. It may be null.
	 * 
	 * @return the video title
	 */
	public String getTitle() {
		return title;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The video description. It may be null.
	 * @return the video description
	 */
	public String getDescription() {
		return description;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The URL link that points to the video thumbnail. This is usually 
	 * 120x90px.
	 * 
	 * @return the URL link that points to the video thumbnail
	 */
	public String getThumbnailUrl() {
		return thumbnailUrl;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The duration of the video.
	 * 
	 * @return the duration of the video
	 */
	public double getDuration() {
		return duration;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The width of the video.
	 * 
	 * @return the width of the video
	 */
	public int getWidth() {
		return width;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The height of the video.
	 * 
	 * @return the height of the video
	 */
	public int getHeight() {
		return height;
	}

	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * Is the video borderless.
	 * 
	 * @return is the video borderless
	 */
	public boolean isBorderless() {
		return borderless;
	}
	
	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * Get the video status id.
	 * 
	 * @return the video status id
	 */
	public int getVideoStatusId() {
		return videoStatusId;
	}
	
	///////////////////////////////////////////////////////////////////////////
	
	/**
	 * The string representation of the video embed bean.
	 * 
	 * @return the string representation
	 */
	public String toString() {
		return 
			"type=" + type +
			", version=" + version +
			", title=" + title +
			", description=" + description +
			", videoStatusId=" + videoStatusId +
			", authorName=" + authorName +
			", authorAccount=" + authorAccount +
			", providerName=" + providerName +
			", providerUrl=" + providerUrl +
			", thumbnailUrl=" + thumbnailUrl +
			", thumbnailWidth=" + thumbnailWidth +
			", thumnailHeight=" + thumbnailHeight +
			", framegrabUrl=" + framegrabUrl +
			", framegrabWidth=" + framegrabWidth +
			", framegrabHeight=" + framegrabHeight +
			", height=" + height +
			", width=" + width +
			", borderless=" + borderless +
			", duration=" + duration +
			", html=" + html;
	}

	///////////////////////////////////////////////////////////////////////////
}
